<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>组件通信-父传子(props的驼峰标识)</title>
    <script src="js/vue.js"></script>
</head>
<body>
<div id="app">
    <h3>使用驼峰标识</h3>
    <cpn :c-User="user"></cpn>
    <h3 >不使用驼峰标识</h3>
    <cpn :cuser="user"></cpn>
</div>
<template id="cpn">
    <div>
        <h2 style="color: chocolate">{{cUser}}</h2>
        <h2>{{cuser}}</h2>
    </div>
</template>

</body>
<script>
    const cpn = {
        template: "#cpn",
        props: {
            cUser:Object,
            cuser:Object
        },
        data(){
            return {

            }
        },
        methods:{

        }
    }

    const app = new Vue({
        el:"#app",
        data: {
            user:{
                name:'huangh',
                age:19,
                heigth:175
            }
        },
        components:{
            cpn
        }
    })
</script>
</html>
